package com.tudouji.project.document.domain;

import com.flow.service.pojo.flow.FileInfo;
import com.tudouji.framework.aspectj.lang.annotation.Excel;
import com.tudouji.framework.web.domain.BaseEntity;
import lombok.Data;

import java.util.List;
import java.util.Objects;

/**
 * 单证跟踪记录对象 document_record
 *
 * @author coal
 * @date 2021-12-07
 */
@Data
public class DocumentRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 项目id */
    private Long projId;

    /** 项目名称 */
    @Excel(name = "项目名称")
    private String projName;

    /** 项目编号 */
    @Excel(name = "项目编号")
    private String projCode;

    /** 托盘主体id */
    private Long orgId;

    /** 项目公司名称 */
    @Excel(name = "项目公司名称")
    private String orgShortName;

    /** 供应商id */
    private Long supplierId;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierShortName;

    /** 下游客户id */
    private Long customerId;

    /** 下游客户名称 */
    @Excel(name = "下游客户名称")
    private String customerShortName;

    /** 机构id */
    private Long fincorpId;

    /** 机构 */
    private String fincorpShortName;

    /** 下游合同id */
    private Long cusCtractId;

    /** 下游合同name */
    @Excel(name = "下游合同name")
    private String cusCtractName;

    /** 下游合同code */
    @Excel(name = "下游合同code")
    private String cusCtractCode;

    /** 单证id */
    private Long docmentId;

    /** 单证编号 */
    private String code;

    /** 单证名称 */
    @Excel(name = "单证名称")
    private String name;

    /** 电子版上传url */
    private String fileUrl;

    /** 三方签署流程id */
    private String thirdFlowId;

    /** 业务表的id */
    private Long orderId;

    /** 业务表code */
    @Excel(name = "业务表code")
    private String orderCode;

    /** 业务跟踪编号 */
    private String tranceNo;

    /** 原始文件是否已归档 */
    @Excel(name = "原始文件是否已归档")
    private Integer archiveFlag;

    /** 创建人 */
    private String createName;

    private String busTable;

    private Long flowId;

    private Long nodeId;

    private FileInfo file;

    private Integer type;

    private List<FileInfo> files;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DocumentRecord doc = (DocumentRecord) o;
        return Objects.equals(docmentId, doc.docmentId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(docmentId);
    }
}
